package leetcode.editor.cn;

public class P342PowerOfFour {
    public static void main(String[] args) {
        Solution solution = new P342PowerOfFour().new Solution();

    }

    //leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        public boolean isPowerOfFour(int n) {
            if (n == 0) {
                return false;
            }
            if (n == 1) {
                return true;
            }
            return n % 4 == 0 && isPowerOfFour(n / 4);
        }
    }
//leetcode submit region end(Prohibit modification and deletion)

}